package com.xtkj.superclub_entity.entity.activity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain=true)
@ToString
@TableName("z_activity_photo")
public class ActivityPhoto implements Serializable {
    /*
        活动的所有照片都放在这张表里
    */
    @TableId(value = "activity_photo_id",type = IdType.INPUT)
    private String activityPhotoId;//活动照片id
    private String activityPhotoUrl;//活动照片路径
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;//修改时间

    public ActivityPhoto(String activityPhotoId, String activityPhotoUrl, Date createTime) {
        this.activityPhotoId = activityPhotoId;
        this.activityPhotoUrl = activityPhotoUrl;
        this.createTime = createTime;
    }
}
